﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using DoeObjects;
using System.Web.Mvc;

namespace DoeLibsMVC.Models
{
    public class EditLoanableModel : EditTitleModel
    {
        private EditLoanableBasicModel _basicModel;

        [Required]
        [Display(Name = "DoeLibS-identifier")]
        public string Barcode 
        { 
            get
            {
                return _basicModel.Barcode;
            }

            set
            {
                _basicModel.Barcode = value;
            } 
        }

        [Required]
        [Display(Name = "Room")]
        public string Location
        {
            get
            {
                return _basicModel.Location;
            }

            set
            {
                _basicModel.Location = value;
            }
        }

        [Required]
        [Display(Name = "Location category")]
        public string Category
        {
            get
            {
                return _basicModel.Category;
            }

            set
            {
                _basicModel.Category = value;
            }
        }

        public LoanableCategory CategoryObject
        {
            get
            {
                return _basicModel.CategoryObject;
            }

            set
            {
                _basicModel.CategoryObject = value;
            }
        }

        public EditLoanableModel()
        {
            _basicModel = new EditLoanableBasicModel();
        }
    }
}